package com.chance.cc.crawler.development.command.trigger.domain.cnsf99;

import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.development.command.trigger.CrawlerJobTriggerCommand;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2020/12/18 11:00
 * @Description
 *      养老网
 **/
public class Cnsf99ScheduleTrigger {

    private static final String domainId = "cnsf99";

    private static CrawlerJobTriggerCommand crawlerJobTriggerCommand =
            new CrawlerJobTriggerCommand("192.168.1.215",9599);

    public static void publishScheduleTriggerInfo(String crawlerKey,String crawlerTriggerKey){
        HttpPage page = crawlerJobTriggerCommand.addOrUpdateScheduleCrawlerTrigger(
                crawlerKey,
                crawlerTriggerKey,
                domainId,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0/10 * * * ?",
                "养老网每10分钟定时采集");

        System.out.println("添加采集调度： "+page.getRawText());
    }
}
